print("比特币货币单位是BTC，美元货币单位是USD")
exchange_rate=input("请输入今日比特币与美元汇率")#输入形式为 USD/BTC
currency=input("请输入带有货币单位的金额")

if currency[-3:]=='BTC':
    usd=eval(currency[0:-3])*eval(exchange_rate)
    print(currency+'相当于'+ str(usd)+'USD')
elif currency[-3:]=='USD':
    btc=eval(currency[0:-3])/eval(exchange_rate)
    print(currency+'相当于'+ str(btc)+'BTC')
else:
    print("输入错误，请重新输入")

